<?php include('adminMenu.php');?>
<h1>Users List</h1>

<table>
  <thead>
    <tr>
      <th>Loginid</th>
      <th>Loginname</th>
      <th>Password</th>
      <th>Name</th>
      <th>Createdate</th>
      <th>Userrole</th>
      <th>Status</th>
      <th>Emailaddress</th>
      <th>Contactnumber</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($users as $user): ?>
    <tr>
      <td><a href="<?php echo url_for('user/show?loginid='.$user->getLoginid()) ?>"><?php echo $user->getLoginid() ?></a></td>
      <td><?php echo $user->getLoginname() ?></td>
      <td><?php echo $user->getPassword() ?></td>
      <td><?php echo $user->getName() ?></td>
      <td><?php echo $user->getCreatedate() ?></td>
      <td><?php echo $user->getRole()->getRolename()?></td>
      <td><?php echo $user->getStatus() ?></td>
      <td><?php echo $user->getEmailaddress() ?></td>
      <td><?php echo $user->getContactnumber() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('user/new') ?>">New</a>
